<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改商品详情信息')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-tGoodDetail-edit" th:object="${tGoodDetail}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">商品id：</label>
                <div class="col-sm-8">
                    <input name="goodId" th:field="*{goodId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="goodDate" th:value="${#dates.format(tGoodDetail.goodDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">周几：</label>
                <div class="col-sm-8">
                    <input name="week" th:field="*{week}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">票面价：</label>
                <div class="col-sm-8">
                    <input name="ticketPrice" th:field="*{ticketPrice}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">段数：</label>
                <div class="col-sm-8">
                    <input name="paragraph" th:field="*{paragraph}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">行数：</label>
                <div class="col-sm-8">
                    <input name="goodRow" th:field="*{goodRow}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">座位号：</label>
                <div class="col-sm-8">
                    <input name="seatNumber" th:field="*{seatNumber}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">剩余数量：</label>
                <div class="col-sm-8">
                    <input name="inventory" th:field="*{inventory}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">售价：</label>
                <div class="col-sm-8">
                    <input name="price" th:field="*{price}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">默认结算：</label>
                <div class="col-sm-8">
                    <input name="defaultSettlementPrice" th:field="*{defaultSettlementPrice}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">会员结算：</label>
                <div class="col-sm-8">
                    <input name="memberSettlementPrice" th:field="*{memberSettlementPrice}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">修改人员：</label>
                <div class="col-sm-8">
                    <input name="updateUser" th:field="*{updateUser}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "bajiaostar/tGoodDetail";
        $("#form-tGoodDetail-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-tGoodDetail-edit').serialize());
            }
        }

        $("input[name='goodDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>